﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace WindowsGame1
{
    class TiroManager
    {
        public static List<Tiro> listaTiros = new List<Tiro>();
        public static Texture2D texturaDosTiros;

        public static void CriarTiro(Vector2 posicao)
        {
            Tiro tiro = new Tiro(texturaDosTiros);
            tiro.posicao = posicao;
            listaTiros.Add(tiro);
        }


        public static void Update()
        {
            foreach (Tiro tiroAtual in listaTiros)
            {
                tiroAtual.Update();
            }
        }

        public static void Draw(SpriteBatch spriteBatch)
        {
            foreach (Tiro tiroAtual in listaTiros)
            {
                tiroAtual.Draw(spriteBatch);
            }
        }



    }
}
